<?php


require("../lib/mysql_connect.php");

function get_eleve()
{
  $eleve_req = "SELECT * FROM eleve WHERE id_enseignant ='".$_SESSION['id_membre']."'";
  $eleve_result = mysql_query($eleve_req);

  if( $eleve_result != FALSE )
  {
    $result = array();
    while( $eleve = mysql_fetch_array($eleve_result) )
    {
      $temp_array = array( 'id'     => $eleve['id_eleve'], 
                           'nom'    => $eleve['nom'], 
                           'prenom' => $eleve['prenom'],
                           'classe'  => $eleve['classe'],
                           'genre'  => $eleve['genre']);
      array_push( $result, $temp_array );
    }
    return $result;
  }
  else
    return array();
}


?>
